import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import DeviceData from '../views/monitorData/deviceData.vue'
import DeviceCheck from '../views/monitorData/deviceCheck.vue'
import Device from '../views/systemSetting/device.vue'
import FaultList from '../views/monitorData/faultList.vue'
import CreateDevice from '../views/systemSetting/createDevice.vue'
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
    children: [
      {
        path: "/deviceData",
        name: "DeviceData",
        component: DeviceData
      },
      {
        path: "/deviceCheck",
        name: "DeviceCheck",
        component: DeviceCheck
      },
      {
        path: "/deviceManager",
        name: "deviceManager",
        component: Device,
      },
      {
        path: "/createDevice",
        name: "createDevice",
        component: CreateDevice
      },
      {
        path: "/faultList",
        name: "faultList",
        component: FaultList
      },
    ]
  },

];

const router = new VueRouter({
  routes
});

export default router;
